package org.ycx.upms.dao.model;

import java.io.Serializable;
import java.util.Date;
import org.ycx.common.annotation.FormDesc;

@FormDesc(pk="permissionId")
public class SecPermission implements Serializable {
    /** 主键 */
    @FormDesc(name="主键",maxLength=10,type=1)
    private Integer permissionId;

    /** 系统编号 */
    @FormDesc(name="系统编号",maxLength=10,type=1)
    private Integer systemId;

    /** 权限名称 */
    @FormDesc(name="权限名称",maxLength=100,type=0)
    private String name;

    /** 权限类别 */
    @FormDesc(name="权限类别",maxLength=4,type=0)
    private String category;

    /** 权限值 */
    @FormDesc(name="权限值",maxLength=200,type=0)
    private String value;

    /** 资源路径 */
    @FormDesc(name="资源路径",maxLength=400,type=0)
    private String uri;

    /** 资源图标 */
    @FormDesc(name="资源图标",maxLength=100,type=0)
    private String icon;

    /** 资源状态 */
    @FormDesc(name="资源状态",maxLength=2,type=0)
    private String state;

    /** 上级资源 */
    @FormDesc(name="上级资源",maxLength=10,type=1)
    private Integer pid;

    /** 资源顺序 */
    @FormDesc(name="资源顺序",maxLength=10,type=1)
    private Integer orders;

    /** 其他授权资源 */
    @FormDesc(name="其他授权资源",maxLength=500,type=0)
    private String other;

    /** 创建时间 */
    @FormDesc(name="创建时间",maxLength=10,type=3)
    private Date createTs;

    /** 创建人 */
    @FormDesc(name="创建人",maxLength=10,type=1)
    private Integer createUid;

    /** 更新时间 */
    @FormDesc(name="更新时间",maxLength=10,type=3)
    private Date updateTs;

    /** 更新人 */
    @FormDesc(name="更新人",maxLength=10,type=1)
    private Integer updateUid;

    private static final long serialVersionUID = 1L;

    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    public Integer getSystemId() {
        return systemId;
    }

    public void setSystemId(Integer systemId) {
        this.systemId = systemId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getOrders() {
        return orders;
    }

    public void setOrders(Integer orders) {
        this.orders = orders;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public Integer getCreateUid() {
        return createUid;
    }

    public void setCreateUid(Integer createUid) {
        this.createUid = createUid;
    }

    public Date getUpdateTs() {
        return updateTs;
    }

    public void setUpdateTs(Date updateTs) {
        this.updateTs = updateTs;
    }

    public Integer getUpdateUid() {
        return updateUid;
    }

    public void setUpdateUid(Integer updateUid) {
        this.updateUid = updateUid;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", permissionId=").append(permissionId);
        sb.append(", systemId=").append(systemId);
        sb.append(", name=").append(name);
        sb.append(", category=").append(category);
        sb.append(", value=").append(value);
        sb.append(", uri=").append(uri);
        sb.append(", icon=").append(icon);
        sb.append(", state=").append(state);
        sb.append(", pid=").append(pid);
        sb.append(", orders=").append(orders);
        sb.append(", other=").append(other);
        sb.append(", createTs=").append(createTs);
        sb.append(", createUid=").append(createUid);
        sb.append(", updateTs=").append(updateTs);
        sb.append(", updateUid=").append(updateUid);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecPermission other = (SecPermission) that;
        return (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()))
            && (this.getSystemId() == null ? other.getSystemId() == null : this.getSystemId().equals(other.getSystemId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
            && (this.getUri() == null ? other.getUri() == null : this.getUri().equals(other.getUri()))
            && (this.getIcon() == null ? other.getIcon() == null : this.getIcon().equals(other.getIcon()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getOrders() == null ? other.getOrders() == null : this.getOrders().equals(other.getOrders()))
            && (this.getOther() == null ? other.getOther() == null : this.getOther().equals(other.getOther()))
            && (this.getCreateTs() == null ? other.getCreateTs() == null : this.getCreateTs().equals(other.getCreateTs()))
            && (this.getCreateUid() == null ? other.getCreateUid() == null : this.getCreateUid().equals(other.getCreateUid()))
            && (this.getUpdateTs() == null ? other.getUpdateTs() == null : this.getUpdateTs().equals(other.getUpdateTs()))
            && (this.getUpdateUid() == null ? other.getUpdateUid() == null : this.getUpdateUid().equals(other.getUpdateUid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
        result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
        result = prime * result + ((getUri() == null) ? 0 : getUri().hashCode());
        result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
        result = prime * result + ((getOther() == null) ? 0 : getOther().hashCode());
        result = prime * result + ((getCreateTs() == null) ? 0 : getCreateTs().hashCode());
        result = prime * result + ((getCreateUid() == null) ? 0 : getCreateUid().hashCode());
        result = prime * result + ((getUpdateTs() == null) ? 0 : getUpdateTs().hashCode());
        result = prime * result + ((getUpdateUid() == null) ? 0 : getUpdateUid().hashCode());
        return result;
    }
}